const {
  HYEventStore
} = require("hy-event-store")
import {
  getRecommendSong
} from "../network/music"

export const eventStore = new HYEventStore({
  state: {
    recommendSongs: []
  },
  actions: {
   async fecthSong(val) {
      const data = await getRecommendSong(3778678);
      // console.log(data);
      // console.log(val);
      val.recommendSongs=data.playlist
      // let recommendSongs = data.playlist.tracks.slice(0, 6);
      // this.setData({
      //   recommendSongs
      // })
    }
  }
})